package com.cn.pack.controller;

import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.servlet.http.Cookie;
import javax.servlet.http.HttpServletRequest;

@RestController
public class HelloController2 {

    @RequestMapping(path = "/hello/get")
    public String get(HttpServletRequest request) {
        String app = request.getHeader("app");
        System.out.println("--------- app = " + app);
        String cookies = request.getHeader("Cookie");
        System.out.println("cookies = " + cookies);
        return "********* HELLO WORLD 2*********";
    }

    @RequestMapping(path = "/hello/div")
    public String div() {
        return "************ THIS IS DIV **************";
    }
}
